import {IExpert} from "@/api/expert.ts";
import {Table, TableColumnsType} from "antd";

interface IProps {
    dataSource: Array<IExpert>
    loading: boolean
}

const ExpertTable = ({ dataSource, loading }: IProps) => {
    const columns: TableColumnsType<IExpert> = [
        { title: '主播名称', dataIndex: 'expertName' },
        { title: '主播ID', dataIndex: 'expertID' },
        { title: '主播微信', dataIndex: 'expertWx' },
        { title: '寄样', dataIndex: 'expertSendSample' },
        { title: '地址', dataIndex: 'expertAddress' },
        { title: '单号', dataIndex: 'expertCode' },
        { title: '操作', dataIndex: 'expertCode' }
    ]
    return (
        <Table<IExpert> loading={ loading } scroll={{ x: 650 }} style={{ overflow: 'auto' }} dataSource={dataSource} columns={columns} />
    )
}

export default ExpertTable